package cn.zb.mapstruct;

import cn.zb.api.user.vo.DeptVO;
import cn.zb.api.user.vo.RoleVO;
import cn.zb.api.user.vo.UserVO;
import cn.zb.entity.SysDept;
import cn.zb.entity.SysRole;
import cn.zb.entity.SysUser;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface UserBeanMapper {
     UserBeanMapper instance = Mappers.getMapper(UserBeanMapper.class);

     UserVO userVO(SysUser user);
     List<UserVO> USER_VO_LIST(List<SysUser> users);

     RoleVO roleVO(SysRole role);
     List<RoleVO> ROLE_VO_LIST(List<SysRole> roles);

     DeptVO deptVO(SysDept dept);
     List<DeptVO> DEPT_VO_LIST(List<SysDept> depts);
}
